<?php


namespace dsp\singleton;


class Main extends \kernel\BaseMain
{

    public function execute($choice = 'all')
    {
    }

    /** 简单的单例模式测试 */
    public function test()
    {
        echo PHP_EOL . "=================== 测试单例模式" . PHP_EOL;
        $firstObj = Singleton::getInstance();
        $secondObj = Singleton::getInstance();

        echo '第一个实例：';
        var_dump($firstObj);

        echo '第二个实例：';
        var_dump($secondObj);
    }


}